/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package assisisw.smartcal.entitysubsystem;

import assisisw.smartcal.entitysubsystem.exceptions.calendar.CalendarException;
import java.io.Serializable;
import java.util.Collection;
import javax.ejb.Local;

/**
 *
 * @author Francesco
 */
@Local
public interface ICalendarController extends Serializable 
{

    /**
     * @param c
     * @param u
     * @return
     * @throws IllegalArgumentException
     */
    //public boolean canAccess(Calendar c, User u);

    /**
     * @param owner
     * @param name
     * @return
     */
    //public Calendar getOwnedByOwnerAndName(User owner, String name);

    /**
     * @param calendar
     * @param user
     */
    public void insert ( Calendar calendar , User user ) ;
    
    /**
     * @param c
     * @param inviteds
     * @throws IllegalArgumentException
     */
    public void share(Calendar c, Collection<User> inviteds) throws CalendarException;

    /**
     * @param c 
     * @param u
     */
    public void unShare ( Calendar c , User u ) ;
    
    /**
     * @param calendar
     */
    public void update ( Calendar calendar ) ;
    
    /**
     * @param calendar
     */
    public void delete ( Calendar calendar ) ;
    
}
